package com.jk.controller;


import com.jk.bean.Tree;
import com.jk.service.TreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;


@Controller
@RequestMapping("tree")
public class TreeController {

    @Resource
    private TreeService treeService;

    @ResponseBody
    @RequestMapping("getTree")
    public List<Tree> getTree(){

        return treeService.getTree();
    }
}
